3.2457 \(\int \frac{a+b x^n}{x^3} \, dx\)

Optimal. Leaf size=24 \[ -\frac{a}{2 x^2}-\frac{b x^{n-2}}{2-n} \]

[Out]

-a/(2*x^2) - (b*x^(-2 + n))/(2 - n)

________________________________________________________________________________________

Rubi [A]  time = 0.0087493, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {14} \[ -\frac{a}{2 x^2}-\frac{b x^{n-2}}{2-n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)/x^3,x]

[Out]

-a/(2*x^2) - (b*x^(-2 + n))/(2 - n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{a+b x^n}{x^3} \, dx &=\int \left (\frac{a}{x^3}+b x^{-3+n}\right ) \, dx\\ &=-\frac{a}{2 x^2}-\frac{b x^{-2+n}}{2-n}\\ \end{align*}

Mathematica [A]  time = 0.0196845, size = 20, normalized size = 0.83 \[ -\frac{a-\frac{2 b x^n}{n-2}}{2 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)/x^3,x]

[Out]

-(a - (2*b*x^n)/(-2 + n))/(2*x^2)

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 21, normalized size = 0.9 \begin{align*}{\frac{1}{{x}^{2}} \left ({\frac{b{{\rm e}^{n\ln \left ( x \right ) }}}{-2+n}}-{\frac{a}{2}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)/x^3,x)

[Out]

(b/(-2+n)*exp(n*ln(x))-1/2*a)/x^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.0344, size = 57, normalized size = 2.38 \begin{align*} -\frac{a n - 2 \, b x^{n} - 2 \, a}{2 \,{\left (n - 2\right )} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x^3,x, algorithm="fricas")

[Out]

-1/2*(a*n - 2*b*x^n - 2*a)/((n - 2)*x^2)

________________________________________________________________________________________

Sympy [A]  time = 0.531052, size = 60, normalized size = 2.5 \begin{align*} \begin{cases} - \frac{a n}{2 n x^{2} - 4 x^{2}} + \frac{2 a}{2 n x^{2} - 4 x^{2}} + \frac{2 b x^{n}}{2 n x^{2} - 4 x^{2}} & \text{for}\: n \neq 2 \\- \frac{a}{2 x^{2}} + b \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)/x**3,x)

[Out]

Piecewise((-a*n/(2*n*x**2 - 4*x**2) + 2*a/(2*n*x**2 - 4*x**2) + 2*b*x**n/(2*n*x**2 - 4*x**2), Ne(n, 2)), (-a/(
2*x**2) + b*log(x), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b x^{n} + a}{x^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x^3,x, algorithm="giac")

[Out]

integrate((b*x^n + a)/x^3, x)